package com.xja.mapper;

import com.xja.pojo.CoursePerson;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CoursePersonMapper {
    int deleteByPrimaryKey(Integer cid);

    int insert(CoursePerson record);

    int insertSelective(CoursePerson record);

    CoursePerson selectByPrimaryKey(Integer cid);

    int updateByPrimaryKeySelective(CoursePerson record);

    int updateByPrimaryKey(CoursePerson record);

    @Select("select count(userId) from course_person where cid = #{cid} and userId = #{userId}")
    int getPersonCountByCid(@Param("cid") Integer cid, @Param("userId") Integer userId);




}